package com.lantosec.hmrp.modules.system.vo;


import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.system.entity.SysArea;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 区域表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysArea对象", description="区域表")
public class SysAreaVO extends BaseVO<SysArea> {
    private static final long serialVersionUID = 1L;


    public SysAreaVO(SysArea entity){
        this.areaId = entity.getAreaId();
        this.areaName = entity.getAreaName();
        this.parentId = entity.getParentId();
        this.leaf = entity.getLeaf();
        this.remark = entity.getRemark();
        this.areaOrder = entity.getAreaOrder();
    }

    @Override
    public SysArea convertToEntity(){
        return new SysArea(this);
    }


    @ApiModelProperty(value = "区域ID")
    private String areaId;

    @ApiModelProperty(value = "区域名称")
    private String areaName;

    @ApiModelProperty(value = "上级ID")
    private String parentId;

    @ApiModelProperty(value = "是否末级(0否1是)")
    private Boolean leaf;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "排序")
    private Integer areaOrder;


}
